home *** CD-ROM | disk | FTP | other *** search
/ Aminet 30 / Aminet 30 (1999)(Schatztruhe)[!][Apr 1999].iso / Aminet / dev / mui / bcc_src.lha / Parser / test / MyApplication_new.c < prev    next >
Encoding:
C/C++ Source or Header  |  1996-12-28  |  1.8 KB  |  90 lines

  1. /* ---------------------------------------------- */
  2. /* BCC header. Inserted into every generated file */
  3. /* ---------------------------------------------- */
  4.  
  5. #ifndef _BCC_EVERY
  6. #define _BCC_EVERY
  7.  
  8. /* Includes necessary for every mui c code */
  9.  
  10. #include <proto/exec.h>
  11. #include <proto/muimaster.h>
  12. #include <libraries/mui.h>
  13.  
  14. #include <mui/muiextra.h>
  15.  
  16. #include <string.h>
  17.  
  18. /* defines that help adjusting to any compiler */
  19.  
  20. #ifdef _DCC
  21.     #define REG(x) __ ## x
  22.     #define ASM
  23.     #define SAVEDS __geta4
  24. #else
  25.     #define REG(x) register __ ## x
  26.  
  27.     #ifdef _STORM
  28.  
  29.             #define ASM
  30.             #define SAVEDS __saveds
  31.  
  32.     #else
  33.  
  34.         #if defined __MAXON__ || defined __GNUC__
  35.             #define ASM
  36.             #define SAVEDS
  37.         #else
  38.             #define ASM    __asm
  39.             #define SAVEDS __saveds
  40.         #endif
  41.     
  42.     #endif
  43.  
  44. #endif
  45.  
  46. #define CallSuper() DoSuperMethodA(cl, obj, msg)
  47. #define value (tag->ti_Data)
  48. #define GetData() INST_DATA(cl, obj)
  49.  
  50. #endif
  51. #include "MyApplication.h"
  52. #include "MyWindow.h"
  53.  
  54. unsigned long mMyApplicationOM_NEW( struct IClass *cl, Object *obj, Msg msg )
  55. {
  56.  MyApplicationData *data, _tdata;
  57.  data = &_tdata;
  58.  obj = (Object*)DoSuperNew( cl, obj,
  59.  
  60.     MUIA_Application_Author, "RafaĆ® Mantiuk",
  61.     MUIA_Application_Base, "KOCH",
  62.     MUIA_Application_Title, "Koch",
  63.     MUIA_Application_Version, "$VER: Koch 1.0 (1.1.97)",
  64.     MUIA_Application_Copyright, "Copyright (c)1996, RafaĆ® Mantiuk",
  65.     MUIA_Application_Description, "Koch's fractals.",
  66.     MUIA_Application_HelpFile, "Koch.guide",
  67.  
  68.     SubWindow, data->win = MyWindowObject,
  69.     End
  70. ,
  71.  TAG_MORE, (unsigned long)msg->ops_AttrList,
  72.  TAG_DONE );
  73.  if( !obj ) return 0;
  74.  data = INST_DATA( cl, obj );
  75.  memcpy( data, &_tdata, sizeof( MyApplicationData ) );
  76.  /* UC Beg */
  77.  
  78.  
  79.     DoMethod( data->win, 
  80.         MUIM_Notify,MUIA_Window_CloseRequest, TRUE,
  81.         obj, 2, MUIM_Application_ReturnID,MUIV_Application_ReturnID_Quit);
  82.  
  83.     set( data->win, MUIA_Window_Open, TRUE );
  84.  
  85.  
  86.  /* UC End */
  87.  
  88.  return (unsigned long)obj;
  89. }
  90.